package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import service.TokenService;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@Controller
public class ChatController {
    @Resource
    private TokenService tokenService;
    @RequestMapping("/chat")
    public void chatWithDoctor(HttpServletRequest request){
        String token = request.getHeader("token");
        try {
            if (tokenService.validate(request.getHeader("user-agent"),token)){

            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
